package com.Homework2;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class Test11 {
    public static void main(String[] args) {
        String[] arr1={"黑龙江省","浙江省","江西省","广东省","福建省"};
        String[] arr2={"哈尔滨","杭州","南昌","广州","福州"};
        HashMap<Object, Object> map = new HashMap<>();
        for (int i = 0; i < arr1.length; i++) {
            map.put(arr1[i],arr2[i]);
        }
        Set<Map.Entry<Object, Object>> entries = map.entrySet();
        for (Map.Entry<Object, Object> entry : entries) {
            System.out.println("省会:"+entry.getKey()+"->"+"城市:"+entry.getValue());
        }
    }
}
